#!/bin/sh
################################################################################
# Name:        autogen.sh
# Purpose:     Generates autotools building system.
# Author:      Evgeniy Tarassov
# Modified by: etarassov
# Created:     2006
# Copyright:   ilaptev, TT-solutions
# Licence:     GNU
################################################################################

if [ ! -f configure.ac -o ! -f Makefile.am ]; then
    echo "Please run this script from the objectdet source directory."
    exit 2
fi

# use --copy to allow simultaneous use on windows under mingw and cygwin platforms.
# Symlinking of files under mingw does not work out for cygwin and vice-versa.
echo "Setting up build system for dopener:"
echo " - aclocal " && aclocal && \
echo " - libtoolize " && libtoolize --copy --automake && \
echo " - autoconf " && autoconf && \
echo " - autoheader " && autoheader && \
echo " - automake " && automake --add-missing --copy && \
echo "Build setup successful, type \"configure\" to configure now." && \
exit 0

echo "Automatic build files setup failed!"

exit 1
